package com.forezp.thinking.chapter18;

import java.io.IOException;
import java.io.StringReader;

/**
 * Created by forezp on 2017/12/8.
 */
public class MemoryOnput {

    public static void read(String s) throws IOException {
        StringReader in = new StringReader(s);
        int c;
        while ((c = in.read()) != -1) {
            System.out.print((char) c);
        }
    }

    public static void main(String[] args) throws IOException {
        read(BufferedInputFile.readFile("/Users/forezp/IdeaProjects/java-study/pom.xml").toString());
    }
}
